package com.itheima.service.impl;

import com.itheima.dao.OrderDao;
import com.itheima.pojo.Order;
import com.itheima.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author huyoufu <https://github.com/huyoufu>
 * @TIME 2020-08-07 09:03
 * @description
 */

@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    private OrderDao orderDao;
    @Override
    public Order findById(int id) {
        int i=5/0;
        System.out.println("模拟service根据id查询订单....");
        return orderDao.findById(id);
    }

    @Override
    public void update(Order order) {
        System.out.println("模拟service更新订单....");
        orderDao.update(order);
    }
}
